<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form action="/springmvc/yang/add"> 
		<table border="1">
			<tr>
				<td>username:</td>
				<td><input type="text" name="userName"></td>
			</tr>
			<tr>
			<td>password:</td>
				<td><input type="text" name="password"></td>
			</tr>
			<tr>
				<td colspan="2">
					<input type="submit" value="submit">
				</td>
			</tr>
		</table>
	</form>
	<table>
	<c:forEach items="${users}" var="user">
		<tr>
		<td>
			id:<c:out value="${user.id}" />
			</td>
			<td>
			username:<c:out value="${user.userName}" />
			</td>
			<td>
			password:<c:out value="${user.password}" />
			</td>
			<td>
				<a href="/springmvc/yang/delete?id=${user.id }">删除</a>
				<a href="/springmvc/yang/updateInit?id=${user.id }">修改</a>
			</td>
		</tr>
	</c:forEach>
	</table>
</body>
</html>